Integrand size = 14, antiderivative size = 77 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=(a-b)^3 x+\frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {(3 a-b) b^2 \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d} \]
[Out]
Time = 0.06 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3742, 398, 209} \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a-b) \tan ^3(c+d x)}{3 d}+x (a-b)^3+\frac {b^3 \tan ^5(c+d x)}{5 d} \]
[In]
[Out]
Rule 209
Rule 398
Rule 3742
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^3}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \left (b \left (3 a^2-3 a b+b^2\right )+(3 a-b) b^2 x^2+b^3 x^4+\frac {(a-b)^3}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {(3 a-b) b^2 \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d}+\frac {(a-b)^3 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = (a-b)^3 x+\frac {b \left (3 a^2-3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {(3 a-b) b^2 \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d} \\ \end{align*}
Time = 1.15 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.32 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\frac {\tan (c+d x) \left (\frac {15 (a-b)^3 \text {arctanh}\left (\sqrt {-\tan ^2(c+d x)}\right )}{\sqrt {-\tan ^2(c+d x)}}+b \left (45 a^2-15 a b \left (3-\tan ^2(c+d x)\right )+b^2 \left (15-5 \tan ^2(c+d x)+3 \tan ^4(c+d x)\right )\right )\right )}{15 d} \]
[In]
[Out]
Time = 0.07 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.14
method | result | size |
norman | \(\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) x +\frac {b \left (3 a^{2}-3 a b +b^{2}\right ) \tan \left (d x +c \right )}{d}+\frac {b^{3} \tan \left (d x +c \right )^{5}}{5 d}+\frac {\left (3 a -b \right ) b^{2} \tan \left (d x +c \right )^{3}}{3 d}\) | \(88\) |
derivativedivides | \(\frac {\frac {b^{3} \tan \left (d x +c \right )^{5}}{5}+a \,b^{2} \tan \left (d x +c \right )^{3}-\frac {b^{3} \tan \left (d x +c \right )^{3}}{3}+3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \tan \left (d x +c \right )+b^{3} \tan \left (d x +c \right )+\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(108\) |
default | \(\frac {\frac {b^{3} \tan \left (d x +c \right )^{5}}{5}+a \,b^{2} \tan \left (d x +c \right )^{3}-\frac {b^{3} \tan \left (d x +c \right )^{3}}{3}+3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \tan \left (d x +c \right )+b^{3} \tan \left (d x +c \right )+\left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{d}\) | \(108\) |
parts | \(x \,a^{3}+\frac {b^{3} \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {3 a \,b^{2} \left (\frac {\tan \left (d x +c \right )^{3}}{3}-\tan \left (d x +c \right )+\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {3 a^{2} b \left (\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(110\) |
parallelrisch | \(\frac {3 b^{3} \tan \left (d x +c \right )^{5}+15 a \,b^{2} \tan \left (d x +c \right )^{3}-5 b^{3} \tan \left (d x +c \right )^{3}+15 a^{3} d x -45 a^{2} b d x +45 a \,b^{2} d x -15 b^{3} d x +45 a^{2} b \tan \left (d x +c \right )-45 a \,b^{2} \tan \left (d x +c \right )+15 b^{3} \tan \left (d x +c \right )}{15 d}\) | \(112\) |
risch | \(x \,a^{3}-3 a^{2} b x +3 a \,b^{2} x -b^{3} x +\frac {2 i b \left (45 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-90 a b \,{\mathrm e}^{8 i \left (d x +c \right )}+45 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}+180 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}-270 a b \,{\mathrm e}^{6 i \left (d x +c \right )}+90 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+270 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-330 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+140 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+180 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-210 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+70 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+45 a^{2}-60 a b +23 b^{2}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}\) | \(226\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.17 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\frac {3 \, b^{3} \tan \left (d x + c\right )^{5} + 5 \, {\left (3 \, a b^{2} - b^{3}\right )} \tan \left (d x + c\right )^{3} + 15 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} d x + 15 \, {\left (3 \, a^{2} b - 3 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )}{15 \, d} \]
[In]
[Out]
Time = 0.16 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.64 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\begin {cases} a^{3} x - 3 a^{2} b x + \frac {3 a^{2} b \tan {\left (c + d x \right )}}{d} + 3 a b^{2} x + \frac {a b^{2} \tan ^{3}{\left (c + d x \right )}}{d} - \frac {3 a b^{2} \tan {\left (c + d x \right )}}{d} - b^{3} x + \frac {b^{3} \tan ^{5}{\left (c + d x \right )}}{5 d} - \frac {b^{3} \tan ^{3}{\left (c + d x \right )}}{3 d} + \frac {b^{3} \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \tan ^{2}{\left (c \right )}\right )^{3} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.40 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.35 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=a^{3} x - \frac {3 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} b}{d} + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a b^{2}}{d} + \frac {{\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} b^{3}}{15 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1027 vs. \(2 (73) = 146\).
Time = 0.95 (sec) , antiderivative size = 1027, normalized size of antiderivative = 13.34 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 10.47 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.49 \[ \int \left (a+b \tan ^2(c+d x)\right )^3 \, dx=\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5\,d}+\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a^2\,b-3\,a\,b^2+b^3\right )}{d}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,{\left (a-b\right )}^3}{a^3-3\,a^2\,b+3\,a\,b^2-b^3}\right )\,{\left (a-b\right )}^3}{d}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (a\,b^2-\frac {b^3}{3}\right )}{d} \]
[In]
[Out]